import pandas as pd
index = ['王蒙','李珊','赵胜','刘文']
columns = ['语文','数学','英语']
dict = {'语文':[110,95,98,112],'数学':[120,110,80,106],'英语':[105,108,100,97]}
df = pd.DataFrame(dict,index,columns)
print("原始数据",df)
print("选取所有语文成绩",df['语文'])
print("选取所有语文和数学成绩列:",df[['语文','数学']])
print("选取王蒙到赵胜的语文和英语成绩:",df[['语文','英语']]['王蒙':'赵胜'])
print("选取李珊及之后同学的所有科目成绩:",df[['语文','数学','英语']]['李珊':])


